home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_gen_itempickup.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
2KB
|
111 lines
# Jones 3D Cog Script
#
# gen_ItemPickup.cog
#
# [RT]
#
# (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
#
# ===================================================================
symbols
message activated
message callback
# Change these variables ONLY!
# -------------------------------------------------------------------
# Use in_pickup_low or in_pickup_med for the "get" keyframe
keyframe get=in_pickup_low.key local
# Item-specific voice line
sound foundSnd=INXJ106.wav local
# Item bin number
int bin=92 local
# Don't touch!
# -------------------------------------------------------------------
cog talkCog local
thing player local
thing item
end
# ===================================================================
code
activated:
player = GetSourceRef();
# Disable player controls and stuff
if (MakeMeStop() == -1)
return;
DeselectWeaponWait(player);
# Make sure this pickup is valid
if (GetInv(player, bin) < GetInvMax(player, bin))
{
StartCutscene(0);
# Capture player so we get callback message
CaptureThing(player);
# Start the animation
PlayKey(player, get, 5, 0x12, 0);
}
# Call the Pickup Lines cog
talkCog = GetCogByIndex(0);
SendMessage(talkCog, 27);
# Set up the camera
if (Rand() < 0.5)
{
SetExtCamOffset('0.15 -0.05 0.04');
}
else
{
SetExtCamOffset('-0.15 -0.05 0.04');
}
SetExtCamLookOffset('0.0 0.02 0.0');
return;
# -------------------------------------------------------------------
callback:
ReleaseThing(player);
# Get rid of the item
DestroyThing(item);
# Add to inventory
ChangeInv(player, bin, 1.0);
SetInvAvailable(player, bin, 1);
JonesInvItemChanged(bin);
# Wait a bit, then start the voice line
Sleep(1.0);
PlayVoice(player, foundSnd, 1.0, 0);
# Reset the camera
RestoreExtCam();
# Enable player control
ClearActorFlags(player, 0x200000);
EndCutscene();
return;
end